FROM java:8 as bash
WORKDIR /beta
EXPOSE 80
COPY ./target/*.jar .
#设置时区
RUN /bin/cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai' >/etc/timezone
# JAVA_OPTS="-Xms500m -Xmx500m"
# SPRING_PROFILES_ACTIVE=test
ENTRYPOINT java ${JAVA_OPTS} -jar -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/beta/logs/cust-bind-webapi -Drocketmq.client.logRoot=/beta/logs/cust-bind-webapi/rocketmq -Drocketmq.client.logLevel=ERROR -DlogPath=/beta/logs/cust-bind-webapi/ /beta/cust-bind-webapi.jar --spring.profiles.active=${SPRING_PROFILES_ACTIVE} --server.port=80
# 启动示例：docker run -p 9000:80 -e "JAVA_OPTS=-Xms500m -Xmx500m" -e "SPRING_PROFILES_ACTIVE=pre" demo1/app